//
//  DiscountedDetailsViewController.m
//  ProjectForA
//
//  Created by hmengwei on 14/11/19.
//  Copyright (c) 2014年 hmengwei. All rights reserved.
//

#import "DiscountedDetailsViewController.h"
#import "DiscountedDetailCollectionViewCell.h"
#import "DiscountedViewDetailView.h"
@interface DiscountedDetailsViewController ()

@end

@implementation DiscountedDetailsViewController

- (void)viewDidLoad {
    [self.view setBackgroundColor:[UIColor whiteColor]];
//    [self createScroll];
//    [self createView];
    self.navigationItem.title = @"产品详情"; 
    [self createWebView];
 
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)createWebView
{
    UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 64)];    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:_receiveUrl]];
    [web loadRequest:request];
    [self.view addSubview:web];

}

//在底层建立一个scrollview
//-(void)createScroll
//{
//    self.scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 49 - 64)];
//    [_scroll setContentSize:CGSizeMake(0, 1000)];
//    
//    //设置图片的collectionview
//    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
//    layout.itemSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height / 2);
//    layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
//    layout.minimumLineSpacing = 0;
//    UICollectionView *collect= [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height / 2) collectionViewLayout:layout];
//    collect.dataSource = self;
//    collect.delegate = self;
//    collect.pagingEnabled = YES;
//    
//    [collect registerClass:[DiscountedDetailCollectionViewCell class] forCellWithReuseIdentifier:@"ok"];
//    
//    [_scroll addSubview:collect];
//    
//    [self.view addSubview:_scroll];
//}
//
//
//-(void)createView
//{
//    DiscountedViewDetailView *detailView = [[DiscountedViewDetailView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height / 2, self.view.frame.size.width, self.view.frame.size.height)];
//    [_scroll addSubview:detailView];
//    
//}
//
//
//
//- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
//{
//    return 5;
//}
//
//
//- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
//{
//    DiscountedDetailCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ok" forIndexPath:indexPath];
//    [cell.image setBackgroundColor:[UIColor grayColor]];
//    return cell;
//}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
